package com.example.demo.service.impl;

import com.example.demo.domain.Reserve;
import com.example.demo.mapper.ReserveMapper;
import com.example.demo.service.ReserveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReserveServiceImpl implements ReserveService {

    @Autowired
    ReserveMapper reserveMapper;

    @Override
    public List<Reserve> findAllReserve() {
        return reserveMapper.findAllReserve();
    }

    @Override
    public int deleteReserve(Integer id) {
        return reserveMapper.deleteReserve(id);
    }

    // 添加
    @Override
    public int addReserve(Reserve reserve) {
        return reserveMapper.addReserve(reserve);
    }

    // 修改
    @Override
    public int updateReserve(Reserve reserve) {
        return reserveMapper.updateReserve(reserve);
    }

    @Override
    public List<Reserve> findReserve(Reserve reserve) {
        return reserveMapper.findReserve(reserve);
    }
}
